/*  */
"use strict"
/** @param {import("egg").Application} app */
module.exports = app => {
	const Sequelize = app.Sequelize
	const sequelize = app.model

	let Channel = sequelize.define("channel", {
		create_at: {
			defaultValue: sequelize.literal("CURRENT_TIMESTAMP"),
			type: Sequelize.DATE,
			get() {
				return Date.parse(this.getDataValue("create_at"))
			}
		},
		channel_name: {
			type: Sequelize.STRING(30)
		},
		remarks: {
			type: Sequelize.STRING,
			comment: "备注"
		},
		stat: {
			type: Sequelize.TINYINT
		},
	}, {
		tableName: "app_channel",
		timestamps: false
	})
	return Channel
}
//20181116